<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model app\modules\admin\models\YlPanel */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="cw-panel-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'pan_title')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'pan_pic_url')->fileInput(['class' => 'btn btn-default'])?>

    <?= $form->field($model, 'pan_explain')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'pan_link')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'pan_time')->textInput(['maxlength' => true, 'value' => date("Y-m-d H:i:s"), 'readonly' => true]) ?>

    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? '创建' : '修改', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
<script>
    document.getElementById('cw-panel').setAttribute('class',"active");
</script>